
package tools.packet;



import configs.ServerConfig;
 import constants.ServerConstants;
 import handling.opcode.BossEffectOpcode;
 import handling.opcode.MessageOpcode;
 import handling.opcode.SendPacketOpcode;
 import java.util.List;
 import org.apache.logging.log4j.LogManager;
 import org.apache.logging.log4j.Logger;
 import server.events.DimensionalMirror;
 import tools.MaplePacketCreator;
 import tools.data.output.MaplePacketLittleEndianWriter;



 public class UIPacket
         {
    /*  18 */   private static final Logger log = LogManager.getLogger(UIPacket.class);



    public static byte[] getSPMsg(byte sp, short job) {
        /*  21 */
        if (ServerConfig.DEBUG_MODE) {
            /*  22 */
            log.info("调用"+Thread.currentThread().getStackTrace()[1].getMethodName());

        }
        /*  24 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /*  26 */
        mplew.writeShort(SendPacketOpcode.SHOW_STATUS_INFO.getValue());
        /*  27 */
        mplew.write(ServerConstants.MapleStatusInfo.获得SP.getType());
        /*  28 */
        mplew.writeShort(job);
        /*  29 */
        mplew.write(sp);

        /*  31 */
        return mplew.getPacket();

    }



    public static byte[] getGPMsg(int itemid) {
        /*  35 */
        if (ServerConfig.DEBUG_MODE) {
            /*  36 */
            log.info("调用"+Thread.currentThread().getStackTrace()[1].getMethodName());

        }
        /*  38 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();


        /*  41 */
        mplew.writeShort(SendPacketOpcode.SHOW_STATUS_INFO.getValue());
        /*  42 */
        mplew.write(ServerConstants.MapleStatusInfo.获得家族点.getType());
        /*  43 */
        mplew.writeInt(itemid);

        /*  45 */
        return mplew.getPacket();

    }



    public static byte[] getBPMsg(int amount) {
        /*  49 */
        if (ServerConfig.DEBUG_MODE) {
            /*  50 */
            log.info("调用"+Thread.currentThread().getStackTrace()[1].getMethodName());

        }
        /*  52 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();


        /*  55 */
        mplew.writeShort(SendPacketOpcode.SHOW_STATUS_INFO.getValue());
        /*  56 */
        mplew.write(23);
        /*  57 */
        mplew.writeInt(amount);

        /*  59 */
        return mplew.getPacket();

    }



    public static byte[] getGPContribution(int itemid) {
        /*  63 */
        if (ServerConfig.DEBUG_MODE) {
            /*  64 */
            log.info("调用"+Thread.currentThread().getStackTrace()[1].getMethodName());

        }
        /*  66 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();


        /*  69 */
        mplew.writeShort(SendPacketOpcode.SHOW_STATUS_INFO.getValue());
        /*  70 */
        mplew.write(ServerConstants.MapleStatusInfo.获得贡献度.getType());
        /*  71 */
        mplew.writeInt(itemid);
        /*  72 */
        mplew.write(0);

        /*  74 */
        return mplew.getPacket();

    }



    public static byte[] getTopMsg(String msg) {
        /*  78 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /*  80 */
        mplew.writeShort(SendPacketOpcode.TOP_MSG.getValue());
        /*  81 */
        mplew.writeMapleAsciiString(msg);

        /*  83 */
        return mplew.getPacket();

    }



    public static byte[] getMidMsg(String msg, boolean keep, int index) {
        /*  87 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /*  89 */
        mplew.writeShort(SendPacketOpcode.MID_MSG.getValue());
        /*  90 */
        mplew.write(index);
        /*  91 */
        mplew.writeMapleAsciiString(msg);
        /*  92 */
        mplew.write(keep ? 0 : 1);

        /*  94 */
        return mplew.getPacket();

    }



    public static byte[] clearMidMsg() {
        /*  98 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 100 */
        mplew.writeShort(SendPacketOpcode.CLEAR_MID_MSG.getValue());

        /* 102 */
        return mplew.getPacket();

    }


































    public static byte[] getMapEffectMsg(String msg, int type, int time) {
        /* 137 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 139 */
        mplew.writeShort(SendPacketOpcode.MAP_EFFECT_MSG.getValue());
        /* 140 */
        mplew.writeMapleAsciiString(msg);
        /* 141 */
        mplew.writeInt(type);
        /* 142 */
        mplew.writeInt(time);
        /* 143 */
        mplew.write(1);
        /* 144 */
        mplew.writeShort(0);

        /* 146 */
        return mplew.getPacket();

    }








    public static byte[] getSpecialTopMsg(String msg, int unk, int fontsize, int color) {
        /* 155 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 157 */
        mplew.writeShort(SendPacketOpcode.SPECIAL_TOP_MSG.getValue());
        /* 158 */
        mplew.writeInt(unk);
        /* 159 */
        mplew.writeInt(fontsize);
        /* 160 */
        mplew.writeInt(color);
        /* 161 */
        mplew.writeInt(0);
        /* 162 */
        mplew.writeMapleAsciiString(msg);

        /* 164 */
        return mplew.getPacket();

    }



    public static byte[] getStatusMsg(int itemid) {
        /* 168 */
        if (ServerConfig.DEBUG_MODE) {
            /* 169 */
            log.info("调用"+Thread.currentThread().getStackTrace()[1].getMethodName());

        }
        /* 171 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();


        /* 174 */
        mplew.writeShort(SendPacketOpcode.SHOW_STATUS_INFO.getValue());
        /* 175 */
        mplew.write(ServerConstants.MapleStatusInfo.显示消耗品描述.getType());
        /* 176 */
        mplew.writeInt(itemid);

        /* 178 */
        return mplew.getPacket();

    }



    public static byte[] showMapEffect(String path) {
        /* 182 */
        return MaplePacketCreator.environmentChange(path, BossEffectOpcode.Screen.getValue(), 0);

    }



    public static byte[] MapNameDisplay(int mapid) {
        /* 186 */
        return MaplePacketCreator.environmentChange("maplemap/enter/" + mapid, BossEffectOpcode.Screen.getValue(), 0);

    }



    public static byte[] Aran_Start() {
        /* 190 */
        return MaplePacketCreator.environmentChange("Aran/balloon", BossEffectOpcode.Sound.getValue(), 100);

    }



    public static byte[] playMovie(String data, boolean show) {
        /* 194 */
        if (show) {
            /* 195 */
            log.info("调用"+Thread.currentThread().getStackTrace()[1].getMethodName());

        }
        /* 197 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 199 */
        mplew.writeShort(SendPacketOpcode.PLAY_MOVIE.getValue());
        /* 200 */
        mplew.writeMapleAsciiString(data);
        /* 201 */
        mplew.write(show ? 1 : 0);

        /* 203 */
        return mplew.getPacket();

    }



    public static byte[] summonHelper(boolean summon) {
        /* 207 */
        log.info("调用"+Thread.currentThread().getStackTrace()[1].getMethodName());
        /* 208 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 210 */
        mplew.writeShort(SendPacketOpcode.SUMMON_HINT.getValue());
        /* 211 */
        mplew.write(summon ? 1 : 0);

        /* 213 */
        return mplew.getPacket();

    }



    public static byte[] summonMessage(int type) {
        /* 217 */
        log.info("调用"+Thread.currentThread().getStackTrace()[1].getMethodName());
        /* 218 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 220 */
        mplew.writeShort(SendPacketOpcode.SUMMON_HINT_MSG.getValue());
        /* 221 */
        mplew.write(1);
        /* 222 */
        mplew.writeInt(type);
        /* 223 */
        mplew.writeInt(7000);

        /* 225 */
        return mplew.getPacket();

    }



    public static byte[] summonMessage(String message) {
        /* 229 */
        log.info("调用"+Thread.currentThread().getStackTrace()[1].getMethodName());
        /* 230 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 232 */
        mplew.writeShort(SendPacketOpcode.SUMMON_HINT_MSG.getValue());
        /* 233 */
        mplew.write(0);
        /* 234 */
        mplew.writeMapleAsciiString(message);
        /* 235 */
        mplew.writeInt(200);
        /* 236 */
        mplew.writeInt(10000);

        /* 238 */
        return mplew.getPacket();

    }



    public static byte[] IntroLock(boolean enable) {
        /* 242 */
        log.info("调用"+Thread.currentThread().getStackTrace()[1].getMethodName());
        /* 243 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 245 */
        mplew.writeShort(SendPacketOpcode.INTRO_LOCK.getValue());
        /* 246 */
        mplew.write(enable ? 1 : 0);

        /* 248 */
        return mplew.getPacket();

    }



    public static byte[] getDirectionStatus(boolean enable) {
        /* 252 */
        log.info("调用"+Thread.currentThread().getStackTrace()[1].getMethodName());
        /* 253 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 255 */
        mplew.writeShort(SendPacketOpcode.DIRECTION_STATUS.getValue());
        /* 256 */
        mplew.write(enable ? 1 : 0);

        /* 258 */
        return mplew.getPacket();

    }



    public static byte[] getDirectionInfo(int type, int value) {
        /* 262 */
        log.info("调用"+Thread.currentThread().getStackTrace()[1].getMethodName());
        /* 263 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 265 */
        mplew.writeShort(SendPacketOpcode.DIRECTION_INFO.getValue());
        /* 266 */
        mplew.write(type);
        /* 267 */
        if (type == 9) {
            /* 268 */
            mplew.write(value);

        } else {
            /* 270 */
            mplew.writeInt(value);

        }

        /* 273 */
        return mplew.getPacket();

    }



    public static byte[] getDirectionInfo(int value, int x, int y) {
        /* 277 */
        log.info("调用"+Thread.currentThread().getStackTrace()[1].getMethodName());
        /* 278 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 280 */
        mplew.writeShort(SendPacketOpcode.DIRECTION_INFO.getValue());
        /* 281 */
        mplew.write(value);
        /* 282 */
        mplew.writeInt(x);
        /* 283 */
        mplew.writeInt(y);

        /* 285 */
        return mplew.getPacket();

    }



    public static byte[] getDirectionInfo(String data, int value, int x, int y, int pro) {
        /* 289 */
        log.info("调用"+Thread.currentThread().getStackTrace()[1].getMethodName());
        /* 290 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 292 */
        mplew.writeShort(SendPacketOpcode.DIRECTION_INFO.getValue());
        /* 293 */
        mplew.write(2);
        /* 294 */
        mplew.writeMapleAsciiString(data);
        /* 295 */
        mplew.writeInt(value);
        /* 296 */
        mplew.writeInt(x);
        /* 297 */
        mplew.writeInt(y);
        /* 298 */
        mplew.writeShort(pro);
        /* 299 */
        mplew.writeInt(0);

        /* 301 */
        return mplew.getPacket();

    }



    public static byte[] getDirectionInfo(String data, int value, int x, int y, int a, int b) {
        /* 305 */
        log.info("调用"+Thread.currentThread().getStackTrace()[1].getMethodName());
        /* 306 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 308 */
        mplew.writeShort(SendPacketOpcode.DIRECTION_INFO.getValue());
        /* 309 */
        mplew.write(2);
        /* 310 */
        mplew.writeMapleAsciiString(data);
        /* 311 */
        mplew.writeInt(value);
        /* 312 */
        mplew.writeInt(x);
        /* 313 */
        mplew.writeInt(y);
        /* 314 */
        mplew.write(a);
        /* 315 */
        if (a > 0) {
            /* 316 */
            mplew.writeInt(0);

        }
        /* 318 */
        mplew.write(b);
        /* 319 */
        if (b > 1) {
            /* 320 */
            mplew.writeInt(0);

        }

        /* 323 */
        mplew.write(1);
        /* 324 */
        mplew.writeShort(0);
        /* 325 */
        return mplew.getPacket();

    }



    public static byte[] getDirectionInfoNew(byte type, int value) {
        /* 329 */
        log.info("调用"+Thread.currentThread().getStackTrace()[1].getMethodName());
        /* 330 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 332 */
        mplew.writeShort(SendPacketOpcode.DIRECTION_INFO.getValue());
        /* 333 */
        mplew.write(5);
        /* 334 */
        mplew.write(type);
        /* 335 */
        mplew.writeInt(value);
        /* 336 */
        mplew.writeShort(0);
        /* 337 */
        return mplew.getPacket();

    }



    public static byte[] getDirectionInfoNew(byte type, int x, int y, int z) {
        /* 341 */
        log.info("调用"+Thread.currentThread().getStackTrace()[1].getMethodName());
        /* 342 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 344 */
        mplew.writeShort(SendPacketOpcode.DIRECTION_INFO.getValue());
        /* 345 */
        mplew.write(5);
        /* 346 */
        mplew.write(type);
        /* 347 */
        mplew.writeInt(x);
        /* 348 */
        mplew.writeInt(y);
        /* 349 */
        mplew.writeInt(z);

        /* 351 */
        return mplew.getPacket();

    }



    public static byte[] getDIRECTION_INFO(String data, int value, int s) {
        /* 355 */
        log.info("调用"+Thread.currentThread().getStackTrace()[1].getMethodName());
        /* 356 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 358 */
        mplew.writeShort(SendPacketOpcode.DIRECTION_INFO.getValue());
        /* 359 */
        mplew.write(6);
        /* 360 */
        mplew.writeMapleAsciiString(data);
        /* 361 */
        mplew.writeInt(value);
        /* 362 */
        mplew.writeInt(0);
        /* 363 */
        mplew.writeInt(s);
        /* 364 */
        mplew.writeShort(0);

        /* 366 */
        return mplew.getPacket();

    }



    public static byte[] getDirectionEffect(String data, int value, int x, int y) {
        /* 370 */
        return getDirectionEffect(data, value, x, y, 0);

    }



    public static byte[] getDirectionEffect(String data, int value, int x, int y, int z) {
        /* 374 */
        log.info("调用"+Thread.currentThread().getStackTrace()[1].getMethodName());
        /* 375 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 377 */
        mplew.writeShort(SendPacketOpcode.DIRECTION_INFO.getValue());
        /* 378 */
        mplew.write(2);
        /* 379 */
        mplew.writeMapleAsciiString(data);
        /* 380 */
        mplew.writeInt(value);
        /* 381 */
        mplew.writeInt(x);
        /* 382 */
        mplew.writeInt(y);
        /* 383 */
        mplew.write(1);
        /* 384 */
        mplew.writeInt(0);
        /* 385 */
        mplew.write(1);
        /* 386 */
        mplew.writeInt(z);
        /* 387 */
        mplew.write((z == 0) ? 1 : 0);
        /* 388 */
        mplew.write(0);

        /* 390 */
        return mplew.getPacket();

    }



    public static byte[] getDirectionEffect(int mod, String data, int value, int value2, int value3, int a1, int a2, int a3, int a4, int npc) {

        int i2;
        /* 395 */
        log.info("调用"+Thread.currentThread().getStackTrace()[1].getMethodName());
        /* 396 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 398 */
        mplew.writeShort(SendPacketOpcode.DIRECTION_INFO.getValue());
        /* 399 */
        mplew.write(mod);
        /* 400 */
        switch (mod)
             {
            case 0:
                /* 402 */
                mplew.writeInt(value);
                /* 403 */
                if (value <= 1195) {
                    /* 404 */
                    mplew.writeInt(value2);

                }


            case 1:
                /* 408 */
                mplew.writeInt(value);



            case 2:
                /* 412 */
                mplew.writeMapleAsciiString(data);
                /* 413 */
                mplew.writeInt(value);
                /* 414 */
                mplew.writeInt(value2);
                /* 415 */
                mplew.writeInt(value3);
                /* 416 */
                mplew.write(a1);
                /* 417 */
                if (a1 > 0) {
                    /* 418 */
                    mplew.writeInt(a3);

                }
                /* 420 */
                mplew.write(a2);
                /* 421 */
                if (a2 > 0) {
                    /* 422 */
                    mplew.writeInt(npc);
                    /* 423 */
                    mplew.write((npc > 0) ? 0 : 1);
                    /* 424 */
                    mplew.write(a4);

                }


            case 3:
                /* 428 */
                mplew.writeInt(value);



            case 4:
                /* 432 */
                mplew.writeMapleAsciiString(data);
                /* 433 */
                mplew.writeInt(value);
                /* 434 */
                mplew.writeInt(value2);
                /* 435 */
                mplew.writeInt(value3);



            case 5:
                /* 439 */
                mplew.write(value);
                /* 440 */
                mplew.writeInt(value2);
                /* 441 */
                if (value2 > 0 && value == 0) {
                    /* 442 */
                    mplew.writeInt(value3);
                    /* 443 */
                    mplew.writeInt(a1);

                }


            case 6:
                /* 447 */
                mplew.writeInt(value);



            case 7:
                /* 451 */
                mplew.write(1);
                /* 452 */
                mplew.writeInt(value);
                /* 453 */
                mplew.writeInt(value2);
                /* 454 */
                mplew.writeInt(value3);
                /* 455 */
                mplew.writeInt(a1);
                /* 456 */
                mplew.writeInt(a2);





















































            case 8:
                /* 510 */
                return mplew.getPacket();
            case 10:
                mplew.write(value);
            case 11:
                mplew.writeInt(value);
            case 12:
                mplew.writeMapleAsciiString(data);
                mplew.write(value);
            case 13:
                mplew.writeMapleAsciiString(data);
                mplew.write(value);
                mplew.writeShort(value2);
                mplew.writeInt(value3);
                mplew.writeInt(a1);
            case 14:
                mplew.write(value);
                for (i2 = 0; i2 <= value; i2++) mplew.writeInt(value2);
            case 15:
                return mplew.getPacket();

            case 16:
                mplew.writeInt(value);
                mplew.writeInt(value2);

            case 17:
                mplew.writeInt(value);

            case 18:
                /* 514 */
                mplew.write(value);
        }
        System.out.println("getDirectionInfo() is Unknow mod :: [" + mod + "]");
        return mplew.getPacket();
    }

    public static byte[] getDirectionFacialExpression(int expression, int duration) {
        log.info("调用"+Thread.currentThread().getStackTrace()[1].getMethodName());
        /* 515 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 517 */
        mplew.writeShort(SendPacketOpcode.USER_EMOTION_LOCAL.getValue());
        /* 518 */
        mplew.writeInt(expression);
        /* 519 */
        mplew.writeInt(duration);
        /* 520 */
        mplew.write(0);

        /* 522 */
        return mplew.getPacket();
    }




    public static byte[] IntroEnableUI(int lock) {
        /* 526 */
        return IntroEnableUI(lock, true);

    }



    public static byte[] IntroEnableUI(int lock, boolean block) {
        /* 530 */
        log.info("调用"+Thread.currentThread().getStackTrace()[1].getMethodName());
        /* 531 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 533 */
        mplew.writeShort(SendPacketOpcode.INTRO_LOCK_MOVIE.getValue());
        /* 534 */
        mplew.writeBool((lock > 0));
        /* 535 */
        if (lock > 0) {
            /* 536 */
            mplew.writeShort(block ? 1 : 0);
            /* 537 */
            mplew.write(0);

        } else {
            /* 539 */
            mplew.writeBool((lock <= 0));

        }

        /* 542 */
        return mplew.getPacket();

    }



    public static byte[] IntroDisableUI(boolean enable) {
        /* 546 */
        log.info("调用"+Thread.currentThread().getStackTrace()[1].getMethodName());
        /* 547 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 549 */
        mplew.writeShort(SendPacketOpcode.INTRO_LOCK_MOVIE.getValue());
        /* 550 */
        mplew.write(enable ? 1 : 0);
        /* 551 */
        mplew.write(1);
        /* 552 */
        return mplew.getPacket();

    }




    public static byte[] setStandAloneMode(boolean enable) {
        /* 557 */
        log.info("调用"+Thread.currentThread().getStackTrace()[1].getMethodName());
        /* 558 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 560 */
        mplew.writeShort(SendPacketOpcode.SET_STAND_ALONE_MODE.getValue());
        /* 561 */
        mplew.writeBool(enable);

        /* 563 */
        return mplew.getPacket();

    }



    public static byte[] getNpcNotice(int npcid, String text, int time) {
        /* 567 */
        log.info("调用"+Thread.currentThread().getStackTrace()[1].getMethodName());
        /* 568 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 570 */
        mplew.writeShort(SendPacketOpcode.NPC_NOTICE.getValue());
        /* 571 */
        mplew.writeInt(npcid);
        /* 572 */
        mplew.writeInt(Math.max(1000, time));
        /* 573 */
        mplew.writeMapleAsciiString(text);
        /* 574 */
        mplew.writeMapleAsciiString("");
        /* 575 */
        mplew.writeBool(false);

        /* 577 */
        return mplew.getPacket();

    }








    public static byte[] showFreeMarketMiniMap(boolean show) {
        /* 586 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 588 */
        mplew.writeShort(SendPacketOpcode.FM_HIDE_MINIMAP.getValue());
        /* 589 */
        mplew.writeReversedBool(show);

        /* 591 */
        return mplew.getPacket();

    }









    public static byte[] sendOpenWindow(int id) {
        /* 601 */
        log.info("调用"+Thread.currentThread().getStackTrace()[1].getMethodName());
        /* 602 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 604 */
        mplew.writeShort(SendPacketOpcode.OPEN_WINDOW.getValue());
        /* 605 */
        mplew.writeInt(id);

        /* 607 */
        return mplew.getPacket();

    }









    public static byte[] sendPVPWindow(int npc) {
        /* 617 */
        log.info("调用"+Thread.currentThread().getStackTrace()[1].getMethodName());
        /* 618 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 620 */
        mplew.writeShort(SendPacketOpcode.OPEN_WINDOW.getValue());
        /* 621 */
        mplew.writeInt(50);
        /* 622 */
        if (npc > 0) {
            /* 623 */
            mplew.writeInt(npc);

        }

        /* 626 */
        return mplew.getPacket();

    }









    public static byte[] sendEventWindow(int npc) {
        /* 636 */
        log.info("调用"+Thread.currentThread().getStackTrace()[1].getMethodName());
        /* 637 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 639 */
        mplew.writeShort(SendPacketOpcode.OPEN_WINDOW.getValue());
        /* 640 */
        mplew.writeInt(55);
        /* 641 */
        if (npc > 0) {
            /* 642 */
            mplew.writeInt(npc);

        }

        /* 645 */
        return mplew.getPacket();

    }



    public static byte[] inGameCurNodeEventEnd(boolean enable) {
        /* 649 */
        log.info("调用"+Thread.currentThread().getStackTrace()[1].getMethodName());
        /* 650 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 652 */
        mplew.writeShort(SendPacketOpcode.IN_GAME_CUR_NODE_EVENT_END.getValue());
        /* 653 */
        mplew.writeBool(enable);

        /* 655 */
        return mplew.getPacket();

    }



    public static byte[] sendSceneUI() {
        /* 659 */
        log.info("调用"+Thread.currentThread().getStackTrace()[1].getMethodName());
        /* 660 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 662 */
        mplew.writeShort(SendPacketOpcode.SCENE_UI.getValue());
        /* 663 */
        mplew.writeInt(0);

        /* 665 */
        return mplew.getPacket();

    }






    public static byte[] sendUIWindow(int op, int npc) {
        /* 672 */
        if (ServerConfig.DEBUG_MODE) {
            /* 673 */
            log.info("调用"+Thread.currentThread().getStackTrace()[1].getMethodName());

        }
        /* 675 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 677 */
        mplew.writeShort(SendPacketOpcode.REPAIR_WINDOW.getValue());






        /* 684 */
        mplew.writeInt(op);
        /* 685 */
        mplew.writeInt(npc);
        /* 686 */
        mplew.writeInt(0);

        /* 688 */
        return mplew.getPacket();

    }



    public static byte[] showPQEffect(int n2, String string, String string2) {
        /* 692 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 694 */
        mplew.writeShort(SendPacketOpcode.PQ_EFFECT.getValue());
        /* 695 */
        mplew.write(n2);
        /* 696 */
        switch (n2) {

            case 1:

            case 3:
                /* 699 */
                mplew.writeMapleAsciiString(string);
                /* 700 */
                mplew.writeMapleAsciiString(string2);

                break;


            case 2:

            case 4:
                /* 705 */
                mplew.writeMapleAsciiString(string);

                break;

        }

        /* 709 */
        return mplew.getPacket();

    }



    public static byte[] screenShake(int n2, boolean bl2) {
        /* 713 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 715 */
        mplew.writeShort(SendPacketOpcode.SCREEN_SHAKE.getValue());
        /* 716 */
        mplew.writeInt(n2);
        /* 717 */
        mplew.writeInt(bl2 ? 0 : 20);
        /* 718 */
        mplew.writeInt(bl2 ? 0 : 50);
        /* 719 */
        mplew.writeInt(bl2 ? 0 : 20);

        /* 721 */
        return mplew.getPacket();

    }



    public static byte[] fishingCaught(int id) {
        /* 725 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 727 */
        mplew.writeShort(SendPacketOpcode.FISHING_CAUGHT.getValue());
        /* 728 */
        mplew.writeInt(id);

        /* 730 */
        return mplew.getPacket();

    }



    public static byte[] showSystemMessage(String s) {
        /* 734 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        /* 735 */
        mplew.writeShort(SendPacketOpcode.SHOW_STATUS_INFO.getValue());
        /* 736 */
        mplew.write(MessageOpcode.MS_SystemMessage.getValue());
        /* 737 */
        mplew.writeMapleAsciiString(s);
        /* 738 */
        return mplew.getPacket();

    }



    public static byte[] sendSceneAction(int n2, boolean bl2, int n3) {
        /* 742 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 744 */
        mplew.writeShort(SendPacketOpcode.SCENE_ACTION.getValue());
        /* 745 */
        mplew.writeInt(n2);
        /* 746 */
        mplew.writeBool(bl2);
        /* 747 */
        mplew.writeInt(n3);

        /* 749 */
        return mplew.getPacket();

    }











    public static byte[] setLayerBlind(boolean enable, int shade, int n2) {
        /* 761 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 763 */
        mplew.writeShort(SendPacketOpcode.BOSS_ENV.getValue());
        /* 764 */
        mplew.write(BossEffectOpcode.Blind.getValue());
        /* 765 */
        mplew.writeBool(enable);
        /* 766 */
        mplew.writeShort(shade);
        /* 767 */
        mplew.writeShort(0);
        /* 768 */
        mplew.writeShort(0);
        /* 769 */
        mplew.writeShort(0);
        /* 770 */
        mplew.writeInt(n2);
        /* 771 */
        mplew.writeInt(0);

        /* 773 */
        return mplew.getPacket();

    }



    public static byte[] openWebUI(String wzBackgrnd, String url) {
        /* 777 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        /* 778 */
        mplew.writeShort(SendPacketOpcode.OPEN_WEB_UI.getValue());

        /* 780 */
        mplew.writeInt(271);
        /* 781 */
        mplew.writeMapleAsciiString("\"" + wzBackgrnd + "(" + url + "");


        /* 784 */
        return mplew.getPacket();

    }



    public static byte[] ShowSupportUI() {
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        mplew.writeShort(SendPacketOpcode.SUPPORT_SYSTEM_DATA.getValue());
        mplew.writeHexString("E4 A4 07 00");
        mplew.writeHexString("E6 A4 07 00");
        mplew.writeHexString("0F A5 07 00");
        mplew.writeShort(500);
        mplew.writeInt(180);
        mplew.writeHexString("0C 00 00 00");
        mplew.writeHexString("00 00 00 00 32 00 00 00 C6 1B 25 00 01 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 32 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 2E A5 07 00 02 00 00 00 64 00 00 00 BF 3A 25 00 01 00 00 00 60 27 00 00 00 00 00 00 03 00 00 00 96 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 E7 A4 07 00 04 00 00 00 C8 00 00 00 2A 29 28 00 01 00 00 00 60 27 00 00 00 00 00 00 05 00 00 00 FA 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 E8 A4 07 00 06 00 00 00 2C 01 00 00 2D E3 27 00 01 00 00 00 C0 4E 00 00 00 00 00 00 07 00 00 00 5E 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 E9 A4 07 00 08 00 00 00 90 01 00 00 EE 42 1F 00 01 00 00 00 00 00 00 00 00 00 00 00 09 00 00 00 C2 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 EA A4 07 00 0A 00 00 00 F4 01 00 00 51 28 28 00 01 00 00 00 60 27 00 00 00 00 00 00 0B 00 00 00 F4 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ");
        mplew.writeHexString("0C 00 00 00");
        mplew.writeHexString("00 00 00 00 00 00 01 00 00 00 1C 00 C3 BF C8 D5 D0 C7 D0 C7 CF E4 D7 D3 BB F1 B5 C3 C9 CF CF DE D4 F6 BC D3 31 B8 F6 2E 02 00 00 00 00 00 03 00 00 00 29 00 D5 CB BA C5 C4 DA CB F9 D3 D0 BD C7 C9 AB B5 C4 B9 D6 CE EF CA D5 B2 D8 CC BD CF D5 CA B1 BC E4 CB F5 B6 CC 32 30 25 A1 A3 04 00 00 00 00 00 05 00 00 00 25 00 C3 BF C8 D5 BC AB CF DE CD BB C6 C6 CA AF CF E4 D7 D3 BB F1 C8 A1 C9 CF CF DE D4 F6 BC D3 CE AA 35 B8 F6 A1 A3 06 00 00 00 00 00 07 00 00 00 1C 00 C3 BF C8 D5 D0 C7 D0 C7 CF E4 D7 D3 BB F1 B5 C3 C9 CF CF DE D4 F6 BC D3 34 B8 F6 2E 08 00 00 00 00 00 09 00 00 00 25 00 C3 BF C8 D5 D0 C7 D0 C7 C8 CE CE F1 D6 D0 BB F1 B5 C3 B5 C4 D0 C7 D0 C7 BD B1 C0 F8 CC E1 B8 DF 32 30 25 A1 A3 0A 00 00 00 00 00 0B 00 00 00 26 00 CA C0 BD E7 C4 DA CB F9 D3 D0 BD C7 C9 AB BF C9 D2 D4 BD F8 D0 D0 BB A5 B6 AF BD BB BB BB A1 A2 BD BB D2 D7 A1 A3 ");
        mplew.writeHexString("0B 00 00 00");
        mplew.writeHexString("08 00 00 00 04 00 4D 73 67 31 42 00 B1 D8 D0 EB D3 B5 D3 D0 BF C9 D4 DA 5B C3 B0 CF D5 B5 BA D6 A7 D4 AE 5D D6 D0 BB F1 B5 C3 B5 C4 5B BD C7 C9 AB BF C9 BD BB D2 D7 5D D0 A7 B9 FB A3 AC B2 C5 C4 DC B9 BB BD F8 D0 D0 BD BB D2 D7 A1 A3 04 00 4D 73 67 32 12 00 C9 D0 CE B4 BB F1 B5 C3 C3 B0 CF D5 B7 D6 CA FD A1 A3 04 00 4D 73 67 33 14 00 BB F1 B5 C3 C1 CB 25 64 B7 D6 C3 B0 CF D5 B7 D6 CA FD A1 A3 04 00 4D 73 67 34 10 00 C4 BF C7 B0 BB B9 CE DE B7 A8 BD E1 CB E3 A1 A3 04 00 4D 73 67 35 18 00 CF B5 CD B3 CE AC BB A4 D6 D0 A3 AC D4 DD CA B1 CE DE B7 A8 BD E1 CB E3 04 00 4D 73 67 36 3A 00 B8 C3 BD B1 C0 F8 D5 CB BA C5 CF C2 D6 BB C4 DC D3 D0 D2 BB B8 F6 BD C7 C9 AB C1 EC C8 A1 A3 AC 5C 6E C8 B7 C8 CF CA B9 D3 C3 B5 B1 C7 B0 BD C7 C9 AB C1 EC C8 A1 C2 F0 A3 BF 04 00 4D 73 67 37 16 00 B6 D4 B7 BD CA C7 B2 BB BF C9 BD BB D2 D7 B5 C4 BD C7 C9 AB A1 A3 04 00 4D 73 67 38 5F 00 B1 D8 D0 EB CD EA B3 C9 5B C3 B0 CF D5 B5 BA D6 A7 D4 AE CF B5 CD B3 5D 5C 6E B4 EF B3 C9 35 30 30 B7 D6 C8 CE CE F1 5B C3 B0 CF D5 BC D2 BC AA B6 F7 B5 C4 CE CA BA F2 5D 5C 6E C7 D2 B3 D6 D3 D0 5B BD BB D2 D7 D0 ED BF C9 5D D0 A7 B9 FB BA F3 B2 C5 C4 DC B9 BA C8 EB B5 C0 BE DF A1 A3 ");
        mplew.writeHexString("E7 A4 07 00");
        mplew.writeHexString("50 00 00 00");
        return mplew.getPacket();
    }



    public static byte[] SupportSystemUI() {
        /* 833 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        /* 834 */
        mplew.writeShort(SendPacketOpcode.SUPPORT_SYSTEM_UI.getValue());

        /* 836 */
        mplew.write(1);
        /* 837 */
        mplew.writeMapleAsciiString("UICNSupportSystem");
        /* 838 */
        return mplew.getPacket();

    }



    public static byte[] ExpandPropBar() {
        /* 842 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        /* 843 */
        mplew.writeShort(SendPacketOpcode.EXPAND_PROP_BAR.getValue());

        /* 845 */
        mplew.write(36);
        /* 846 */
        mplew.writeLong(PacketHelper.getTime(-1L));
        /* 847 */
        mplew.writeLong(PacketHelper.getTime(-1L));
        /* 848 */
        return mplew.getPacket();

    }






    public static byte[] SpineScreen(short a, String env, String value, Boolean b, String value2) {
        /* 855 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
        /* 856 */
        mplew.writeShort(SendPacketOpcode.BOSS_ENV.getValue());
        /* 857 */
        mplew.write(BossEffectOpcode.SpineScreen.getValue());
        /* 858 */
        mplew.writeShort(a);
        /* 859 */
        mplew.writeInt(1);
        /* 860 */
        mplew.write(0);
        /* 861 */
        mplew.writeMapleAsciiString(env);
        /* 862 */
        mplew.writeMapleAsciiString(value);
        /* 863 */
        mplew.writeZeroBytes(11);
        /* 864 */
        mplew.writeInt(0);
        /* 865 */
        mplew.writeInt(0);
        /* 866 */
        mplew.writeBool(b.booleanValue());
        /* 867 */
        if (b.booleanValue()) {
            /* 868 */
            mplew.writeMapleAsciiString(value2);

        }


        /* 872 */
        return mplew.getPacket();

    }



    public static byte[] showDimensionalMirror(List<DimensionalMirror> dimensionalMirrors) {
        /* 876 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 878 */
        mplew.writeShort(SendPacketOpcode.DIMENSIONAL_MIRROR.getValue());
        /* 879 */
        mplew.writeInt(dimensionalMirrors.size());
        /* 880 */
        dimensionalMirrors.forEach(it -> {

            mplew.writeMapleAsciiString(it.getTitle());


            mplew.writeMapleAsciiString(it.getDescription());

            mplew.writeInt(it.getReqLevel());

            mplew.writeInt(0);

            mplew.writeInt(it.getIndex());

            mplew.writeInt(0);

            mplew.writeInt(it.getType());

            mplew.writeBool(it.getMulitPlayer());

            mplew.writeInt(it.getRewards().length);
            for (int i : it.getRewards()) {
                mplew.writeInt(i);
            }

        });
        /* 893 */
        return mplew.getPacket();

    }



    public static byte[] ScriptProgressItemMessage(int itemId, String msg) {
        /* 897 */
        MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

        /* 899 */
        mplew.writeShort(SendPacketOpcode.LP_ScriptProgressItemMessage.getValue());
        /* 900 */
        mplew.writeInt(itemId);
        /* 901 */
        mplew.writeMapleAsciiString(msg);

        /* 903 */
        return mplew.getPacket();

    }

}


/* Location:              C:\PGX\Server.jar!\tools\packet\UIPacket.class
 * Java compiler version: 8 (52.0)
 * JD-Core Version:       1.1.3
 */